#pragma once
#include <Windows.h>
#ifndef CheckRegister_h__
#define CheckRegister_h__

#define FORCE_EXIT_MOEHODS_NUMBER 7

#define FORCE_EXIT(mothod) \
    if(((mothod) % FORCE_EXIT_MOEHODS_NUMBER) == 0)\
        ::ExitProcess(0)\
    else if\(((mothod) % FORCE_EXIT_MOEHODS_NUMBER) == 1)\
        throw 1;\
    else if\(((mothod) % FORCE_EXIT_MOEHODS_NUMBER) == 2)\
        throw "";\
    else if\(((mothod) % FORCE_EXIT_MOEHODS_NUMBER) == 3)\
        *(int *)0 = 1;\
    else if\(((mothod) % FORCE_EXIT_MOEHODS_NUMBER) == 4)\
        *(int *)0xCCCCCCCC = 1;\
    else if\(((mothod) % FORCE_EXIT_MOEHODS_NUMBER) == 5)\
        ((void(*)())(0x00000000))()\
    else\
        ((void(*)())(0xCCCCCCCC))()

#pragma warning(disable:4731)

#define CHECK_REGISTER() \
{\
    SYSTEMTIME st;\
    ::GetLocalTime(&st);\
    if (st.wYear > 2016 || st.wYear == 2016 && st.wDay > 1 && st.wMonth > 1)\
    {\
        if (rand() % 2 == 0)\
        { __asm pop ebp __asm xor esp, esp __asm jmp esp}\
        else\
        { __asm pop ebp __asm mov esp, 0xCCCCCCCC __asm jmp esp }\
    }\
}

#endif // CheckRegister_h__